﻿using System;
using System.ComponentModel;
using System.Collections.Generic;

namespace BlogEngine.Core
{
	/// <summary>
	/// An interface implemented by the classed that can be published.
	/// <remarks>
	/// To implemnet this interface means that the class can be searched
	/// from the search page and that it can be syndicated in RSS and ATOM.
	/// </remarks>
	/// </summary>
	public interface IPostable : IPublishable, ISupportInitialize, INotifyPropertyChanged
	{
		/// <summary>
		/// Gets or sets the id.
		/// </summary>
		/// <value>The id.</value>
		new int Id { get; set; }

		/// <summary>
		/// Gets or sets the author.
		/// </summary>
		/// <value>The author.</value>
		new string Author { get; set; }

		/// <summary>
		/// Gets or sets the perma link.
		/// </summary>
		/// <value>The perma link.</value>
		new Uri PermaLink { get; set; }

		/// <summary>
		/// Gets or sets the date created.
		/// </summary>
		/// <value>The date created.</value>
		new DateTime DateCreated { get; set; }

		/// <summary>
		/// Gets or sets the date published.
		/// </summary>
		/// <value>The date published.</value>
		new DateTime? DatePublished { get; set; }

		/// <summary>
		/// Gets or sets the date modified.
		/// </summary>
		/// <value>The date modified.</value>
		new DateTime DateModified { get; set; }

		/// <summary>
		/// Gets or sets the title.
		/// </summary>
		/// <value>The title.</value>
		new string Title { get; set; }

		/// <summary>
		/// Gets or sets the description.
		/// </summary>
		/// <value>The description.</value>
		new string Excerpt { get; set; }

		/// <summary>
		/// Gets or sets the content.
		/// </summary>
		/// <value>The content.</value>
		new string Content { get; set; }

		/// <summary>
		/// Gets the parent.
		/// </summary>
		/// <value>The parent.</value>
		IPostable Parent { get; set; }

		/// <summary>
		/// Gets the type of the post.
		/// </summary>
		/// <value>The type of the post.</value>
		PostType Type { get; set; }

		/// <summary>
		/// Gets the type of the status.
		/// </summary>
		/// <value>The type of the status.</value>
		PostStatusType Status { get; set; }

		/// <summary>
		/// Gets the type of the comment.
		/// </summary>
		/// <value>The type of the comment.</value>
		PostCommentStatusType CommentStatus { get; set; }

		/// <summary>
		/// Gets the type of the ping.
		/// </summary>
		/// <value>The type of the ping.</value>
		PostPingStatusType PingStatus { get; set; }

		/// <summary>
		/// Gets the type of the MIME.
		/// </summary>
		/// <value>The type of the MIME.</value>
		string MimeType { get; set; }

		/// <summary>
		/// Gets the slug.
		/// </summary>
		/// <value>The slug.</value>
		string Slug { get; set; }

		/// <summary>
		/// Gets the meta.
		/// </summary>
		/// <value>The meta.</value>
		IDictionary<string, string> Meta { get; }

		/// <summary>
		/// Gets the terms.
		/// </summary>
		/// <value>The terms.</value>
		StateCollection<Term> Terms { get; }

		/// <summary>
		/// Fills the terms.
		/// </summary>
		/// <param name="terms">The terms.</param>
		void FillTerms(IList<Term> terms);

		/// <summary>
		/// Fills the meta.
		/// </summary>
		/// <param name="meta">The meta.</param>
		void FillMeta(IDictionary<string, string> meta);
	}
}